from django.urls import path,re_path

from course.views import CourseDirectionListApiView,CourseCategoryListApiView,CourseListApiView,CourseDetaileView,CourseChapterListApiView

urlpatterns = [
   # 课程方向
    path('direction/',CourseDirectionListApiView.as_view()),
   # 课程分类
    re_path(r'^category/(?P<directionID>\d+)/$',CourseCategoryListApiView.as_view()),

   # 课程列表
    re_path(r'^course/(?P<directionID>\d+)/(?P<categoryID>\d+)/$',CourseListApiView.as_view()),
   # 课程详情
    re_path(r'^detailes/(?P<courseID>\d+)/$', CourseDetaileView.as_view()),
    # re_path(r'^chapter/(?P<courseID>\d+)/$',CourseDetaileView.as_view()),
    re_path(r'^(?P<courseID>\d+)/chapters/$', CourseChapterListApiView.as_view()),

]






